.class Lcom/example/m6shop/GoodsActivity$4;
.super Ljava/lang/Thread;
.source "GoodsActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6shop/GoodsActivity;->getSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6shop/GoodsActivity;


# direct methods
.method constructor <init>(Lcom/example/m6shop/GoodsActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    .line 333
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 15

    .prologue
    const/4 v14, 0x1

    .line 335
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 338
    new-instance v6, Landroid/os/Message;

    invoke-direct {v6}, Landroid/os/Message;-><init>()V

    .line 340
    .local v6, "msg":Landroid/os/Message;
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v12, "\u5f00\u59cb\u6293\u53d6\u6570\u636e---"

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 341
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    const-string v12, "userInfo"

    .line 342
    const/4 v13, 0x0

    .line 341
    invoke-virtual {v11, v12, v13}, Lcom/example/m6shop/GoodsActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v8

    .line 343
    .local v8, "preferences":Landroid/content/SharedPreferences;
    const-string v11, "uid"

    const-string v12, ""

    invoke-interface {v8, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 344
    .local v0, "account":Ljava/lang/String;
    const-string v11, "pass"

    const-string v12, ""

    invoke-interface {v8, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    .line 345
    .local v7, "password":Ljava/lang/String;
    if-eqz v0, :cond_0

    const-string v11, ""

    invoke-virtual {v0, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_1

    .line 346
    :cond_0
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 347
    const-string v11, "nologin"

    iput-object v11, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 348
    iput v14, v6, Landroid/os/Message;->arg1:I

    .line 349
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v11, v11, Lcom/example/m6shop/GoodsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 411
    :goto_0
    return-void

    .line 353
    :cond_1
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v12, v12, Lcom/example/m6shop/GoodsActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v12}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v12, "/index.php?ctrl=app&action=goodslist&uid="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&pwd="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&typeid="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v12, v12, Lcom/example/m6shop/GoodsActivity;->typeid:Ljava/lang/String;

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&datatype=json"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&pagesize="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    # getter for: Lcom/example/m6shop/GoodsActivity;->pagesize:I
    invoke-static {}, Lcom/example/m6shop/GoodsActivity;->access$3()I

    move-result v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 354
    .local v10, "url":Ljava/lang/String;
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "\u8c03\u7528\u66f4\u65b0\u6570\u636e----------------------------"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 355
    invoke-static {v10}, Lmyclass/HttpConn;->getStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 356
    .local v9, "str":Ljava/lang/String;
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "\u8fd4\u56de\u6570\u636e"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 359
    :try_start_0
    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 361
    .local v5, "json":Lorg/json/JSONObject;
    const-string v11, "error"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, "true"

    invoke-virtual {v11, v12}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_2

    .line 362
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 364
    const-string v11, "msg"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    iput-object v11, v6, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 365
    const/4 v11, 0x1

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 366
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v11, v11, Lcom/example/m6shop/GoodsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    .line 403
    .end local v5    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v2

    .line 405
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 406
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 408
    const/4 v11, 0x4

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 409
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v11, v11, Lcom/example/m6shop/GoodsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 369
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v5    # "json":Lorg/json/JSONObject;
    :cond_2
    :try_start_1
    const-string v11, "msg"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v11

    if-eqz v11, :cond_3

    .line 370
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 371
    const/4 v11, 0x2

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 372
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v11, v11, Lcom/example/m6shop/GoodsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 376
    :cond_3
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    # getter for: Lcom/example/m6shop/GoodsActivity;->templs:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6shop/GoodsActivity;->access$2(Lcom/example/m6shop/GoodsActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11}, Ljava/util/List;->clear()V

    .line 377
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v12, "\u8f6c\u6362\u6570\u636e"

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 379
    const-string v11, "msg"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 380
    .local v4, "jarray":Lorg/json/JSONArray;
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_1
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v3, v11, :cond_4

    .line 398
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v12, "\u8fd4\u56de\u6570\u636e\u7ed3\u675f"

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 399
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 400
    sget-object v11, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v12, "\u5173\u95ed\u63d0\u793a"

    invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 401
    const/4 v11, 0x3

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 402
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget-object v11, v11, Lcom/example/m6shop/GoodsActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 381
    :cond_4
    new-instance v1, Lbean/GoodsBean;

    invoke-direct {v1}, Lbean/GoodsBean;-><init>()V

    .line 382
    .local v1, "bb":Lbean/GoodsBean;
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "id"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setId(Ljava/lang/String;)V

    .line 385
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v12

    const-string v13, "bagcost"

    invoke-virtual {v12, v13}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/Float;->valueOf(Ljava/lang/String;)Ljava/lang/Float;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/Float;->floatValue()F

    move-result v12

    invoke-static {v12}, Ljava/lang/Math;->round(F)I

    move-result v12

    int-to-float v12, v12

    iput v12, v11, Lcom/example/m6shop/GoodsActivity;->bagcost:F

    .line 386
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget v11, v11, Lcom/example/m6shop/GoodsActivity;->bagcost:F

    invoke-static {v11}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setBagcost(Ljava/lang/String;)V

    .line 387
    const-string v11, "bagcost1"

    new-instance v12, Ljava/lang/StringBuilder;

    iget-object v13, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    iget v13, v13, Lcom/example/m6shop/GoodsActivity;->bagcost:F

    invoke-static {v13}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v12}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 389
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "cost"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setCost(Ljava/lang/String;)V

    .line 390
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "count"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setCount(Ljava/lang/String;)V

    .line 391
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "name"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setName(Ljava/lang/String;)V

    .line 392
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "typeid"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setTypeId(Ljava/lang/String;)V

    .line 393
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "img"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setgoodsimg(Ljava/lang/String;)V

    .line 394
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "is_live"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v1, v11}, Lbean/GoodsBean;->setIs_live(Ljava/lang/String;)V

    .line 395
    iget-object v11, p0, Lcom/example/m6shop/GoodsActivity$4;->this$0:Lcom/example/m6shop/GoodsActivity;

    # getter for: Lcom/example/m6shop/GoodsActivity;->templs:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6shop/GoodsActivity;->access$2(Lcom/example/m6shop/GoodsActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 380
    add-int/lit8 v3, v3, 0x1

    goto/16 :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 413
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 414
    monitor-exit p0

    return-void

    .line 413
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
